package com.pet.petadoption.adoption.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pet.petadoption.pet.entity.Pet;
import com.pet.petadoption.user.entity.User;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 
 * @TableName adoption
 */
@Data
@ToString
@NoArgsConstructor
public class Adoption implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 领养人id
     */
    //将部门的实体类作为外键属性使用
    private User user = new User();

    /**
     * 宠物id
     */
    private Pet pet = new Pet();

    /**
     * 领养日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT")
    private Date adoption_date;

    private static final long serialVersionUID = 1L;
}